using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerState_SideMove : PlayerState_SideBase
{
    public PlayerState_SideMove(StateMachine stateMachine, Player player, string animName) : base(stateMachine, player, animName)
    {

    }
    public override void OnUpdate()
    {
        base.OnUpdate();

        if (player.MoveInput.magnitude == 0)
            stateMachine.SwitchState(player.PlayerSideIdleState);
    }

    public override void OnFixedUpdate()
    {
        base.OnFixedUpdate();
        player.SetVelocity(player.MoveInput.x * player._sidemoveSpeed, player.MoveInput.y * player._sidemoveSpeed);
    }
}
